<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let cluster_info = {
      name: 1,
      age: 2,
      gander: 3
    }
    console.log(cluster_info)
    for (let k in cluster_info) {
      let value = cluster_info[k]; //将原来的value赋值给一个变量
      cluster_info[value] = k; // 为cluster_info赋新key，不能直接使用cluster_info = {cluster_info[k] : k},会报语法错误
      delete cluster_info[k]; // 删除原来的属性
    }
    console.log(cluster_info)
  </script>
</body>

</html>